/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 * @section DESCRIPTION
 *
 */

#ifndef __TSIN_LIBRARY_BULLETKEEPALIVEEVENT_HPP__
#define __TSIN_LIBRARY_BULLETKEEPALIVEEVENT_HPP__

#include <tsin/library/common.hpp>
#include <tsin/library/BulletEvent.hpp>

namespace tsin {

        class LIBRARY_DLLEXPORT BulletKeepAliveEvent : public BulletEvent {
        public:
                BulletKeepAliveEvent(bool d = false);

                virtual DynamicObject *copy();

                void init(int timeout = 60);
                virtual void reinit();

                virtual bool trigger(BulletRuntime &bullet, void *data);
                virtual BulletEvent *handle(BulletRuntime &bullet, void *data);

        private:
                int timeout;
        };

}

extern "C" LIBRARY_DLLEXPORT tsin::DynamicObject *bindKeepAliveEvent();

#endif /* __TSIN_LIBRARY_BULLETKEEPALIVEEVENT_HPP__ */
